From: Ray Strode Date: Fri, 31 Aug 2018 16:48:00 +0000 (-0400) Subject: objectManager: correct other invalid index code in onNameVanished X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~929^2^2~66 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=96c5404fd49b5e35573271a20f0216a4eb8b181a;p=gnome-shell.git objectManager: correct other invalid index code in onNameVanished The object manager tries to synthesize interface removal events if the bus name of a remote object drops off the bus. The code had bad typos in it, though: it reuses the `i` index variable in its inner loop, where it should be using the `j` index variable. This commit corrects the i/j confusion. --- diff --git a/js/misc/objectManager.js b/js/misc/objectManager.js index 134887491..a1b7eb9d2 100644 --- a/js/misc/objectManager.js +++ b/js/misc/objectManager.js @@ -241,8 +241,8 @@ var ObjectManager = new Lang.Class({ let object = this._objects[objectPath]; let interfaceNames = Object.keys(object); - for (let j = 0; i < interfaceNames.length; i++) { - let interfaceName = interfaceNames[i]; + for (let j = 0; j < interfaceNames.length; j++) { + let interfaceName = interfaceNames[j]; if (object[interfaceName]) this._removeInterface(objectPath, interfaceName);